<tpl var layoutBody={ />
<div data-identity="sys:message" data-table="sys_message">
	<div class="layui-breadcrumb">
		<a href="/manage/index.jspx">首页</a>
		<a href="/manage/sys/message/index.jspx">消息管理</a>
		<a href="javascript:;"> <cite>添加</cite></a>
	</div>
	<hr>
	<fieldset class="layui-elem-field">
		<legend>添加 消息管理</legend>
		<div class="layui-field-box">
			<form class="layui-form" action="save.json?oper=create" lay-filter="mSysMessageForm">
				<div class="layui-form-item" data-type="varchar" data-isnull="NO" data-name="receive">
					<label class="layui-form-label">收件人：</label>
					<div class="layui-input-block">
						<input type="text" name="receive" placeholder="请输入收件人" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item" data-type="varchar" data-isnull="NO" data-name="receive">
					<label class="layui-form-label">收件人名称：</label>
					<div class="layui-input-block">
						<input type="text" name="receiveName" placeholder="请输入收件人名称：" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item" data-type="int" data-isnull="NO" data-name="type">
					<label class="layui-form-label">消息类型：</label>
					<div class="layui-input-block">
						<select name="type" class="layui-input">
							<option value="">请选择消息类型</option>
							<tpl for(item in types){ />
							<option value="${item.key}">${item.desc}</option>
							<tpl } />
						</select>
					</div>
				</div>
				<div class="layui-form-item" data-type="varchar" data-isnull="NO" data-name="title">
					<label class="layui-form-label">消息标题：</label>
					<div class="layui-input-block">
						<input type="text" name="title" placeholder="请输入消息标题" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item" data-type="varchar" data-isnull="YES" data-name="abstr">
					<label class="layui-form-label">消息摘要：</label>
					<div class="layui-input-block">
						<input type="text" name="abstr" placeholder="请输入消息摘要" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item" data-type="text" data-isnull="YES" data-name="content">
					<label class="layui-form-label">消息内容：</label>
					<div class="layui-input-block">
						<textarea name="content" placeholder="请输入消息内容" class="layui-textarea"></textarea>
					</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-input-block">
						<a class="layui-btn layui-btn-primary" href="javascript:history.go(-1)">返回</a>
						<button class="layui-btn" lay-submit lay-filter="mSysMessageForm">立即提交</button>
					</div>
				</div>
			</form>
		</div>
	</fieldset>
</div>
<tpl }; />

<tpl var layoutScript={ />
<script type="text/javascript">
	layui.config({
		base: '${webCdn}/plugins/layui/modules/'
	}).extend({
		http: 'http/http.min',
		message: 'message/message.min'
	}).use(['element', 'message', 'form', 'http'], function () {
		// 绑定表单提交事件
		layui.form.on('submit(mSysMessageForm)', function (data) {
			layui.http.post('save.json?oper=create', data.field, function (res) {
				layui.message.success(res.message, () => history.back());
			});

			return false;
		});
	});
</script>
<tpl }; />
<tpl include( "../../tpl/layout-scroll.html" ,{identity:"sys:message",layoutBody:layoutBody,layoutScript:layoutScript}){} />